home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #2 / Monster Media No. 2 (Monster Media)(1994).ISO / prog_bas / mquery.zip / MFORM1.FRM < prev    next >
Text File  |  1994-05-24  |  5KB  |  184 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    AutoRedraw      =   -1  'True
  4.    BackColor       =   &H00FF0000&
  5.    BorderStyle     =   0  'None
  6.    Caption         =   " Visual Basic Ad-Hoc Query Sample"
  7.    ClientHeight    =   4920
  8.    ClientLeft      =   1755
  9.    ClientTop       =   2235
  10.    ClientWidth     =   8520
  11.    ClipControls    =   0   'False
  12.    ControlBox      =   0   'False
  13.    ForeColor       =   &H00FF0000&
  14.    Height          =   5385
  15.    Icon            =   MFORM1.FRX:0000
  16.    Left            =   1665
  17.    LinkTopic       =   "Form1"
  18.    MaxButton       =   0   'False
  19.    MinButton       =   0   'False
  20.    ScaleHeight     =   4920
  21.    ScaleWidth      =   8520
  22.    Top             =   1860
  23.    Width           =   8700
  24.    Begin CommonDialog CMD1 
  25.       Left            =   7725
  26.       Top             =   4065
  27.    End
  28.    Begin CommandButton cmdExit 
  29.       Caption         =   "&Exit"
  30.       Height          =   375
  31.       Left            =   4440
  32.       TabIndex        =   2
  33.       Top             =   3960
  34.       Width           =   1335
  35.    End
  36.    Begin CommandButton cmdContinue 
  37.       Caption         =   "&Continue"
  38.       Height          =   375
  39.       Left            =   2355
  40.       TabIndex        =   1
  41.       Top             =   3975
  42.       Width           =   1335
  43.    End
  44.    Begin Label Label5 
  45.       Alignment       =   2  'Center
  46.       AutoSize        =   -1  'True
  47.       BackColor       =   &H00FF0000&
  48.       Caption         =   "(This sample uses NWIND.MDB for Stored Queries)"
  49.       ForeColor       =   &H00FFFFFF&
  50.       Height          =   195
  51.       Left            =   1875
  52.       TabIndex        =   6
  53.       Top             =   2925
  54.       Width           =   4395
  55.    End
  56.    Begin Label Label4 
  57.       Alignment       =   2  'Center
  58.       AutoSize        =   -1  'True
  59.       BackColor       =   &H00FF0000&
  60.       Caption         =   "Inner && Outer Joins and Column Order"
  61.       FontBold        =   -1  'True
  62.       FontItalic      =   0   'False
  63.       FontName        =   "MS Sans Serif"
  64.       FontSize        =   12
  65.       FontStrikethru  =   0   'False
  66.       FontUnderline   =   0   'False
  67.       ForeColor       =   &H00FFFFFF&
  68.       Height          =   300
  69.       Left            =   1830
  70.       TabIndex        =   5
  71.       Top             =   2505
  72.       Width           =   4635
  73.    End
  74.    Begin Label Label3 
  75.       Alignment       =   2  'Center
  76.       AutoSize        =   -1  'True
  77.       BackColor       =   &H00FF0000&
  78.       Caption         =   "Store/Load/Delete Queries && Exec SQL Statements"
  79.       FontBold        =   -1  'True
  80.       FontItalic      =   0   'False
  81.       FontName        =   "MS Sans Serif"
  82.       FontSize        =   12
  83.       FontStrikethru  =   0   'False
  84.       FontUnderline   =   0   'False
  85.       ForeColor       =   &H00FFFFFF&
  86.       Height          =   300
  87.       Left            =   1080
  88.       TabIndex        =   4
  89.       Top             =   2160
  90.       Width           =   6225
  91.    End
  92.    Begin Label Label2 
  93.       Alignment       =   2  'Center
  94.       BackColor       =   &H00FF0000&
  95.       Caption         =   "Extracted from Microsoft's Visdata by Robert E. Smythe"
  96.       FontBold        =   -1  'True
  97.       FontItalic      =   0   'False
  98.       FontName        =   "Book Antiqua"
  99.       FontSize        =   13.5
  100.       FontStrikethru  =   0   'False
  101.       FontUnderline   =   0   'False
  102.       ForeColor       =   &H00FFFFFF&
  103.       Height          =   765
  104.       Left            =   645
  105.       TabIndex        =   3
  106.       Top             =   3375
  107.       Width           =   6945
  108.    End
  109.    Begin Label Label1 
  110.       Alignment       =   2  'Center
  111.       BackColor       =   &H00FF0000&
  112.       Caption         =   "MQUERY ENGINE FOR VISUAL BASIC Release 1.0  May 24, 1994"
  113.       FontBold        =   -1  'True
  114.       FontItalic      =   0   'False
  115.       FontName        =   "Book Antiqua"
  116.       FontSize        =   24
  117.       FontStrikethru  =   0   'False
  118.       FontUnderline   =   0   'False
  119.       ForeColor       =   &H000000FF&
  120.       Height          =   1935
  121.       Left            =   1380
  122.       TabIndex        =   0
  123.       Top             =   240
  124.       Width           =   5655
  125.    End
  126. End
  127.  
  128. Sub cmdContinue_Click ()
  129.  
  130.    Dim Connect As String, DataBaseName As String
  131.  
  132.    On Error GoTo OpenError
  133.  
  134.          CMD1.Filter = "Access DBs (*.mdb)|*.mdb"
  135.  
  136.          CMD1.FilterIndex = 1
  137.          CMD1.Filename = gstDBName  '""
  138.          CMD1.CancelError = True
  139.          CMD1.Action = 1
  140.  
  141.        If CMD1.Filename <> "" Then
  142.          gstDBName = CMD1.Filename
  143.        Else
  144.          Exit Sub
  145.        End If
  146.        
  147.        Connect = ""
  148.        DataBaseName = gstDBName
  149.  
  150.  
  151.    Set gCurrentDB = OpenDatabase(DataBaseName, False, True, Connect)
  152.  
  153.    RefreshTables fQuery.cTableList, True
  154.  
  155.    
  156.    
  157.    GoTo OpenEnd
  158.  
  159. OpenError:
  160.    ResetMouse Me
  161.    'gfDBOpenFlag = False
  162.    gstDBName = ""
  163.    gstDataType = ""
  164.    If Err <> 32755 Then     'check for common dialog cancelled
  165.      ShowError
  166.    End If
  167.    Resume OpenEnd
  168.  
  169. OpenEnd:
  170. fQuery.Show
  171. Unload Me
  172. End Sub
  173.  
  174. Sub cmdExit_Click ()
  175. End
  176. End Sub
  177.  
  178. Sub Form_Load ()
  179.    form1.Left = (screen.Width - form1.Width) / 2
  180.    form1.Top = (screen.Height - form1.Height) / 2
  181.  
  182. End Sub
  183.  
  184.